package com.pxmeta.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.pxmeta.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 微信用户对象 kt_wx_user
 *
 * @author wcl
 * @date 2022-03-20
 */
@TableName("kt_wx_user")
public class WxUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /** 用户id */
    private Long userId;

    /** 只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段 */
    private String unionId;

    /** 用户的标识，对当前公众号唯一 */
    private String openId;

    /** 小程序唯一身份ID */
    private String routineOpenId;

    /** 用户的昵称 */
    private String nickname;

    /** 用户头像 */
    private String headImgUrl;

    /** 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知 */
    private Integer sex;

    /** 用户所在城市 */
    private String city;

    /** 用户的语言，简体中文为zh_CN */
    private String language;

    /** 用户所在省份 */
    private String province;

    /** 用户所在国家 */
    private String country;

    /** 用户是否订阅该公众号标识 */
    private Integer subscribe;

    /** 关注公众号时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date subscribeTime;

    /** 是否删除 */
    @TableLogic
    private Integer isDel;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUnionId(String unionId)
    {
        this.unionId = unionId;
    }

    public String getUnionId()
    {
        return unionId;
    }
    public void setOpenId(String openId)
    {
        this.openId = openId;
    }

    public String getOpenId()
    {
        return openId;
    }
    public void setRoutineOpenId(String routineOpenId)
    {
        this.routineOpenId = routineOpenId;
    }

    public String getRoutineOpenId()
    {
        return routineOpenId;
    }
    public void setNickname(String nickname)
    {
        this.nickname = nickname;
    }

    public String getNickname()
    {
        return nickname;
    }
    public void setHeadImgUrl(String headImgUrl)
    {
        this.headImgUrl = headImgUrl;
    }

    public String getHeadImgUrl()
    {
        return headImgUrl;
    }
    public void setSex(Integer sex)
    {
        this.sex = sex;
    }

    public Integer getSex()
    {
        return sex;
    }
    public void setCity(String city)
    {
        this.city = city;
    }

    public String getCity()
    {
        return city;
    }
    public void setLanguage(String language)
    {
        this.language = language;
    }

    public String getLanguage()
    {
        return language;
    }
    public void setProvince(String province)
    {
        this.province = province;
    }

    public String getProvince()
    {
        return province;
    }
    public void setCountry(String country)
    {
        this.country = country;
    }

    public String getCountry()
    {
        return country;
    }
    public void setSubscribe(Integer subscribe)
    {
        this.subscribe = subscribe;
    }

    public Integer getSubscribe()
    {
        return subscribe;
    }
    public void setSubscribeTime(Date subscribeTime)
    {
        this.subscribeTime = subscribeTime;
    }

    public Date getSubscribeTime()
    {
        return subscribeTime;
    }
    public void setIsDel(Integer isDel)
    {
        this.isDel = isDel;
    }

    public Integer getIsDel()
    {
        return isDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("unionId", getUnionId())
            .append("openId", getOpenId())
            .append("routineOpenId", getRoutineOpenId())
            .append("nickname", getNickname())
            .append("headImgUrl", getHeadImgUrl())
            .append("sex", getSex())
            .append("city", getCity())
            .append("language", getLanguage())
            .append("province", getProvince())
            .append("country", getCountry())
            .append("subscribe", getSubscribe())
            .append("subscribeTime", getSubscribeTime())
            .append("isDel", getIsDel())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
